package cn.exrick.xboot.securityAdvisor.controllerImpl

import cn.exrick.xboot.base.dto.BreakRolesRecordDto
import cn.exrick.xboot.base.entity.BreakRolesRecord
import cn.exrick.xboot.base.service.IBreakRolesRecordService
import cn.exrick.xboot.base.vo.BreakRolesRecordDetailVo
import cn.exrick.xboot.core.common.vo.PageVo
import cn.exrick.xboot.core.common.vo.Result
import cn.exrick.xboot.securityAdvisor.controller.ISecurityAdvisorController
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.RestController

@RestController
open class BreakRolesRecordController : ISecurityAdvisorController.IBreakRolesRecord{

    @Autowired
    private lateinit var iBreakRolesRecordService: IBreakRolesRecordService

    override fun createOrUpdateBreakRoleRecord(breakRolesRecord: BreakRolesRecord): Result<Any?>? {

        return iBreakRolesRecordService.createOrUpdateBreakRoleRecord(breakRolesRecord)
    }

    override fun removeBreakRoleRecord(ids: Array<out String>): Result<Any?>? {

        return iBreakRolesRecordService.removeBreakRoleRecord(ids)
    }

    override fun getBreakRoleRecordList(breakRolesRecordDto: BreakRolesRecordDto, pageVo: PageVo): Result<MutableMap<String, Any?>>? {

        return iBreakRolesRecordService.getBreakRoleRecordList(breakRolesRecordDto, pageVo)
    }

    override fun getBreakRoleRecordDetail(id: String?): Result<BreakRolesRecordDetailVo>? {

        return iBreakRolesRecordService.getBreakRoleRecordDetail(id)
    }

    override fun getMyBreakRoleRecord(pageVo: PageVo): Result<MutableMap<String, Any?>>? {

        return iBreakRolesRecordService.getMyBreakRoleRecord(pageVo)
    }
}